<template>
  <div class="page has-navbar" v-nav="{ title: '我的订单', showBackButton: true, onBackButtonClick: back,showMenuButton: true,onMenuButtonClick: menu }">
    <div class="page-content text-center">
      <list class="orderList">
        <div class="order" v-for="(order , index) in orderMsg" :key="index">
          <div class="top">
            <div class="time">
              <span>订单时间 {{order.time}}</span>
              <span class="finish">{{order.finish}}</span>
            </div>
            <p class="personMsg">{{order.personMsg}}</p>
            <p class="address">四川省成都市武侯区天益街38号</p>
          </div>
          <div class="flowerMsg">
            <FlowerItem></FlowerItem>
          </div>
          <div class="bottom">
            <div class="price">
              <p>
                <span>配送费</span>
                <span>{{order.psf}}</span>
              </p>
              <p>
                <span>积分</span>
                <span>{{order.jf}}</span>
              </p>
              <p>
                <span>优惠券</span>
                <span>{{order.coupons}}</span>
              </p>
            </div>
            <div class="pay">
              <span>实际付款</span>
              <span class="number">{{order.pay}}</span>
            </div>
          </div>
        </div>
      </list>
    </div>
  </div>
</template>

<script>
  import FlowerItem from '../components/FlowerListItem'
    export default {
      name: "Order",
      data(){
        return{
          orderMsg : [
            {
              time : '2017-01-23 15:32:14',
              finish : '已完成',
              personMsg : '李小龙  13780010013',
              address : '四川省成都市武侯区天益街38号',
              psf : '￥20.00',
              jf : '-￥2.00',
              coupons : '-￥10.00',
              pay : '￥815.00'
            },
            {
              time : '2017-01-23 21:32:14',
              finish : '待支付',
              personMsg : '小龙  13780010013',
              address : '四川省成都市武侯区天益街38号',
              psf : '￥20.00',
              jf : '-￥2.00',
              coupons : '-￥10.00',
              pay : '￥815.00'
            },
            {
              time : '2017-01-23 15:32:14',
              finish : '已完成',
              personMsg : '李小龙  13780010013',
              address : '四川省成都市武侯区天益街38号',
              psf : '￥20.00',
              jf : '-￥2.00',
              coupons : '-￥10.00',
              pay : '￥815.00'
            },

          ]
        }
      },
      components : {
        FlowerItem
      },
      methods:{
        back(){
          this.$router.back('/queryFrom')
        },
        menu(){

        }
      }
    }
</script>

<style scoped lang="less">
*{
  margin: 0;
  padding: 0;
  text-align: start;
}
.order{
  margin: 15px;
  background: #ffffff;
  -webkit-border-radius: 6px;
  -moz-border-radius: 6px;
  border-radius: 6px;
  -webkit-box-shadow: 0 0 15px #ccc;
  -moz-box-shadow: 0 0 15px  #ccc;
  box-shadow: 0 0 15px  #ccc;
  .top,.bottom{
    padding: 15px;
  }
  .top{
    .time{
      line-height: 30px;
      color: #999999;
      display: flex;
      justify-content: space-between;
      .finish{
        color: #ef2b67;
        font-weight: bold;
      }
    }
    p{
      font-weight: bold;
    }
  }
  .bottom{
    padding-top: 0;
    .price{
      padding: 15px 0;
      border-top: 1px dashed #cccccc;
      >p {
        display: flex;
        justify-content: space-between;
        line-height: 30px;
        color: #999999;
      }
    }
    .pay{
      padding-top: 15px;
      display: flex;
      justify-content: space-between;
      font-weight: bold;
      border-top: 1px dashed #cccccc;
      .number{
        color: #ef2b67;
      }
    }
  }
}
</style>
